from email.policy import default

from pydantic import BaseModel, Field
from typing import Optional


class UpdateMetroFault(BaseModel):
    report_order_code: Optional[str] = Field(default='', description='故障单编号')
    report: Optional[str] = Field(default='', description='故障报告')
    # line: Optional[str] = Field(default='', description='故障发生线路')
    # equipment_id: Optional[str] = Field(default='', description='故障设备编号')
    # fault_phenomenon: Optional[str] = Field(default='', description='故障现象')
    # occurrence_time: Optional[str] = Field(default='', description='故障发生时间')
    # fix_time: Optional[str] = Field(default='', description='故障修复时间')
    # impact_operation: Optional[int] = Field(default=0, description='是否影响行车')
    # impact_operation_time: Optional[str] = Field(default='', description='影响行车的时间')
    # safety_impact_level: Optional[str] = Field(default='', description='安全影响程度')
    # env_impact_level: Optional[str] = Field(default='', description='环境影响程度')
    # incidence: Optional[str] = Field(default='', description='影响范围')


class LevelReq(BaseModel):
    equipment_id: str


class ConfigReq(BaseModel):
    id: Optional[str] = Field(default='', description='主键')
    key: Optional[str] = Field(default='', description='key')
    value: Optional[str] = Field(default='', description='value')
    remark: Optional[str] = Field(default='', description='备注')
